package river_city_ransom.services;

import java.util.List;

import exceptions.ComposantError;


public interface PersonnageJouable extends Personnage {
	/** _________________________________________________________ OBSERVATORS */
	public int sommeDArgent();
	public List<Objet> poche();
	
	
	/** __________________________________________________________ INVARIANTS */
//	inv sommeDArgent(P) >= 0
	
	
	/** ________________________________________________________ CONSTRUCTORS */
//	pre init(n, d, f, pv) require n != "" ^ d != NULL ^ f > 0 ^ pv > 0
//	post nom(init(n, d, f, pv)) = n
//	post dimensions(init(n, d, f, pv)) = d
//	post estPorte(init(n, d, f, pv)) = false
//	post estJete(init(n, d, f, pv)) = 0
//	post force(init(n, d, f, pv)) = f
//	post maxPointsDeVie(init(n, d, f, pv)) = pv
//	post pointsDeVie(init(n, d, f, pv)) = pv
//	post choseEquipee(init(n, d, f, pv)) = NULL
//	post position(init(n, d, f, pv)) = Position::init(0, 0, 0)
//	post versLaDroite(init(n, d, f, pv)) = true;
//	post estGele(init(n, d, f, pv)) = 0
//	post sommeDArgent(init(n, d, f, pv)) = 0
//	post poche(init(n, d, f, pv)) = Ø
	public void init(String n, Dimensions d, int f, int pv) throws ComposantError;
	
	
	/** ___________________________________________________________ OPERATORS */
//	pre deposerArgent(P, a) require a > 0
//	post sommeDArgent(deposerArgent(P, a)) = sommeDArgent(P) + a
//	post poche(deposerArgent(P, a)) = poche(P)
//	post pointsDeVie(deposerArgent(P, a)) = pointsDeVie(P)
//	post estPorte(deposerArgent(P, a)) = estPorte(P)
//	post estJete(deposerArgent(P, a)) = estJete(P)
//	post choseEquipee(deposerArgent(P, a)) = choseEquipee(P)
//	post position(deposerArgent(P, a)) = position(P)
//	post versLaDroite(deposerArgent(P, a)) = versLaDroite(P)
//	post estGele(deposerArgent(P, a)) = estGele(P)
	public void deposerArgent(int a) throws ComposantError;
	
//	pre retirerArgent(P, a) require sommeDArgent(P) >= a > 0
//	post sommeDArgent(retirerArgent(P, a)) = sommeDArgent(P) - a
//	post poche(retirerArgent(P, a)) = poche(P)
//	post pointsDeVie(retirerArgent(P, a)) = pointsDeVie(P)
//	post estPorte(retirerArgent(P, a)) = estPorte(P)
//	post estJete(retirerArgent(P, a)) = estJete(P)
//	post choseEquipee(retirerArgent(P, a)) = choseEquipee(P)
//	post position(retirerArgent(P, a)) = position(P)
//	post versLaDroite(retirerArgent(P, a)) = versLaDroite(P)
//	post estGele(retirerArgent(P, a)) = estGele(P)
	public void retirerArgent(int a) throws ComposantError;

//	pre ranger(P, O) require !estVaincu(P) ^ estGele(P) = 0 ^ estMarchandable(O)
//	post poche(ranger(P, O)) = {poche(P) ∪ O}
//	post sommeDArgent(ranger(P, O)) = sommeDArgent(P)
//	post choseEquipee(ranger(P, O)) = O
//	post pointsDeVie(ranger(P, O)) = pointsDeVie(P)
//	post estPorte(ranger(P, O)) = estPorte(P)
//	post estJete(ranger(P, O)) = estJete(P)
//	post position(ranger(P, O)) = position(P)
//	post versLaDroite(ranger(P, O)) = versLaDroite(P)
//	post estGele(ranger(P, O)) = estGele(P)
	public void ranger(Objet o) throws ComposantError;
	
//	pre vendre(P, O) require !estVaincu(P) ^ estGele(P) = 0 ^ O ∈ poche(P)
//	post poche(vendre(P, O)) = {poche(P) \ O}
//	post sommeDArgent(vendre(P, O)) = sommeDArgent(P) + Objet::valeur(O)
//	post choseEquipee(vendre(P, O)) = O
//	post pointsDeVie(vendre(P, O)) = pointsDeVie(P)
//	post estPorte(vendre(P, O)) = estPorte(P)
//	post estJete(vendre(P, O)) = estJete(P)
//	post position(vendre(P, O)) = position(P)
//	post versLaDroite(vendre(P, O)) = versLaDroite(P)
//	post estGele(vendre(P, O)) = estGele(P)
	public void vendre(Objet o) throws ComposantError;
}
